Add Book to My BookshelfPurchase This Book Online

Chapter 6 - Supporting Popular WAN Technologies

Cisco TCP/IP Routing Professional Reference
Chris Lewis
  Copyright © 1999 The McGraw-Hill Companies, Inc.

X.25
X.25 has never been as widely deployed in the United States as it has in Europe, and particularly in the last few years its popularity has declined. It is still an important protocol, however, and we will discuss the basic operation of the protocol and simple X.25 configurations for Cisco routers.
X.25 is a packet-switched technology that supports PVCs, SVCs, and statistical multiplexing in the same way that frame relay does. The X.25 standards also define error correction, flow control procedures, and guaranteeing the correct sequencing for delivery of packets. The X.25 specifications only really covered DTE-to-DCE communication, leaving all X.25 routing functions to be defined by vendors of X.25 equipment.
The penalty to be paid for all this seemingly good stuff in terms of reliability is performance. The acknowledgments, buffering, and retransmission that happen within the X.25 protocols add latency (especially if there are many hops between source and destination), meaning this protocol provides poor performance for carrying TCP traffic that already handles these functions. If your main interest is in networking TCP/IP protocols and transporting legacy protocols such as IPX, SNA, or NetBIOS over a TCP/IP network, it is unlikely you will deploy X.25. In such situations, X.25 is really a competing technology to TCP/IP. Bearing this in mind, in the example configurations, we will only look at how two IP nodes can communicate across an X.25 network via encapsulation of IP data within an X.25 frame for transmission over an X.25 network (termed tunneling). We'll also examine how to translate X.25 traffic to IP, so that a host using TCP/IP communications can communicate with an X.25 host.
X.25 Basics
The physical layer of X.25 is described by the X.21 standard, which is a 15-pin connector. X.21bis was defined to utilize the same functions within a 25-pin connector. This was done to leverage the large available pool of 25-pin connectors in the marketplace. The X.21bis standard specifies support of line speeds up to 48 kbps. Just as the V.35 standard only specifies speeds up to 48 kbps but is commonly run at T-1 speeds (1.544 Mbps), the X.21bis standard will also work at faster speeds as long as the cables used are not too long.
The X.25 second layer 2 is the Link Access Procedure Balanced (LAPB), which is in many ways similar to HDLC. This protocol is responsible for data transfer between a DTE and DCE, link status reporting and synchronization, and error recovery. The LAPB protocol handles all the reliability issues previously discussed. It is worth introducing the most common layer 2 header functions, and how they fit into establishing a DTE-to-DCE X.25 link.
Link establishment uses unnumbered frames; numbered frames are used once the call is established and data is being transferred. The following step sequences, as shown in Fig. 6-12, can be viewed on a protocol analyzer that can decode X.25 frames. It is assumed that the link is using LAPB, rather than the older LAP protocol. LAP had more stages for establishing a call, and starts communication with a Set Asynchronous Response Mode (SARM) instead of a Set Asynchronous Balanced Mode (SABM). You need to make sure that both ends of the link are using the same protocol at this level.
Figure 6-12: X.25 DTE-to-DCE flow control sequence
  1. The normal operation is for the DCE device to be sending out DISC (disconnect) frames at a time interval determined by its T-1 timer setting. This indicates that it is ready to receive a call.
  2. The DTE device will initialize the link with one command, the SABM, which initiates the DCE sending back an Unnumbered Acknowledgment.
  3. The DTE starts sending data using information frames, each of which is acknowledged by RR frames. RR frames are sent by the DCE and indicate that the receiver is ready for more information. If the DCE has information to send to the DTE, it can do this using the same RR frame that acknowledged receipt of DTE data. If the RR frame contains data, it is known as a piggyback acknowledgment.
  4. If the DTE sends enough information to fill the buffers of the DCE, the DCE will send back a Receiver Not Ready (RNR) frame. Upon receipt of a RNR frame, the DTE will remain idle for the length of its T-1 timer, then poll the DCE to see if it is ready.
  5. The DCE will respond to a poll with more RNR packets until it has space in its buffer to take more data, at which time it will send an RR frame to allow the DTE to start sending more Information frames.
  6. The link is cleared by the DTE sending a DISC (disconnect frame), which is responded to by an Unnumbered Acknowledgment.
The third layer protocol in X.25 is called the Packet Layer Procedure (PLP) and provides the procedures for the control of virtual circuits within the X.25 network. The lower two layers have local significance, whereas the packet level has end-to-end significance, as illustrated in Fig. 6-13.
Figure 6-13: X.25 level-three protocols have end-to-end significance
X.25 assigns Logical Channel Numbers (LCNs) to the multiple logical connections to a DTE that can exist over one physical link. In this respect, LCNs are similar to frame relay DLCI numbers when the frame relay interface is in point-to-point mode. LCNs do not have end-to-end significance; rather, they are only used between a specific DTE/DCE pair. This means that the same LCN number can exist in many places on an X.25 network without causing problems. In theory, an LCN can have a value between 0 and 4096; rarely, however, is there the ability or the need to configure more than 255 LCNs on one physical link. LCNs must be assigned to a DTE with some care, however. A call collision would result if both the DTE and DCE were trying to initiate calls on the same LCN. The LCN that most people refer to is actually made up of a Logical Channel Group Number and Logical Channel Number. If an X.25 network provider allocates you a 12-bit LCN, you have both LCGN and LCN. If the provider gives you a 4-bit LCGN and an 8-bit LCN, combine the two with the LCGN at the front to get a 12-digit LCN.
Figure 6-14 illustrates two hosts and a printer that have unique X.25 addresses having significance throughout the X.25 network. These addresses,  known as Network User Addresses (NUAs), conform to the X.121 recommendation for public data networks, which specifies an address length of 14 digits, with 12 being mandatory and 2 being optional. The first four digits are known as the data network identification number (DNIC); the first three identify the country, while the fourth identifies the network within the country. The next eight digits are the national number, and the last two are optional subaddressing numbers allocated by the user, not the network provider.
Figure 6-14: Two hosts and one printer connected to an X.25 WAN
Configuring an X.25 Network Connection
In this section we will use the three lab routers used in the frame relay example. One router will be configured as an X.25 router to emulate an X.25 network. The other two will connect as X.25 DTE devices, and will encapsulate IP traffic within X.25 to transport IP traffic over the X.25 network. This configuration is illustrated in Fig. 6-15.
Figure 6-15: Configuration of a test X.25 network
The key configuration tasks are:
  1. Enable X.25 routing on router 1 and configure it to route packets between router 2 and router 3 based on X.25 address.
  2. Assign each serial interface connected via the X.25 network an IP address from the same IP network (or subnetwork) number.
  3. Assign X.25 NUAs to the serial ports of router 2 and router 3.
  4. Configure router 2 and router 3 for a routing protocol and enable routing protocol updates to traverse the X.25 network.
This configuration establishes between router 2 and router 3 a virtual circuit that allows IP traffic to be encapsulated within X.25, routed through the X.25 network, and delivered to the correct IP address. The configurations for these routers are shown in Fig. 6-16, and the outputs of the show commands to be examined are illustrated in Fig. 6-17.
Configuration for router 3
!
interface Ethernet0
ip address 200.2.2.1 255.255.255.0
!
interface Serial0
ip address 193.1.1.2 255.255.255.0
encapsulation  x25
x25 address 21234567894
x25 map ip 193.1.1.1 21234554321 broadcast
!
interface Serial1
ip address 160.4.5.1 255.255.255.0
shutdown
!
router igrp 12
network 200.2.2.0
network 193.1.1.0
!Configuration for router 2
!
interface Ethernet0
ip address 200.1.1.1 255.255.255.0
!
interface Serial0
ip address 193.1.1.1 255.255.255.0
encapsulation x25
x25 address 21234554321
x25 map ip 193.1.1.2 21234567894 broadcast
!
interface Serial1
ip address 160.4.5.2 255.255.255.0
shutdown
clockrate 64000
!
router igrp 12
network 200.1.1.0
network 193.1.1.0
!
Configuration for router 1
!
x25 routing
!
interface Ethernet0
ip address 200.1.1.1 255.255.255.0
shutdown
!
interface Serial0
no ip address
encapsulation x25 dce
clockrate 19200
!
interface Serial1
no ip address
encapsulation x25 dce
clockrate 19200
!
x25 route 21234554321 interface Serial0
x25 route 21234567894 interface Serial1
!
Figure 6-16: Router configurations for text X.25 network
Let's look at the configurations first. Router 3 and router 2 have similar configurations, so I will give a full explanation only of the configuration for the serial 0 port of router 3.
  Command encapsulation x25 sets the frame encapsulation to X.25 in the default DTE mode. Modification to the X.25 encapsulation type can be specified with optional arguments to this command; for example, ietf could follow this command to specify the IETF type X.25 framing.
  Command x25 address 21234554321 assigns this port the specified NUA. The NUA is used by the X.25 routers to route traffic from source to destination. This number normally will be assigned by the X.25 network provider.
  Command x25 map ip 193.1.1.1 21234554321 broadcast tells router 3 that whenever it needs to reach IP address 193.1.1.1, it will send packets across the X.25 network to NUA 2122344321. The broadcast argument enables forwarding of broadcast routing updates.
The rest of this configuration should be self-explanatory by now. Router 1 is emulating a public X.25 network by performing routing based on X.25 NUAs. The pertinent commands that configure X.25 on router 1 are explained below:
  Command x25 routing globally enables routing based on X.25 NUA on the router.
  Command encapsulation x25 dce configures the serial ports to be X.25 DCE devices. At the physical level, the cable end plugged into the serial port configures the serial port to be a Physical layer DCE, as shown by the show controllers serial 0 command. X.25 requires an X.25 assignment of DTE and DCE also. Clearly, a DTE needs to connect to a DCE, because leaving both connected ports as the default DTE would not enable the line protocol to come up. You can view the X.25 DTE/DCE assignment with the show interface serial 0 command, as shown in Fig. 6-17.
  Command x25 route 21234554321 interface serial 0 tells the router to send traffic destined for this NUA (21234554321) out of port Serial 0. Configuration commands such as these are used to build the X.25 routing table, as shown by the show x25 route command in Fig. 6-17.
The result of this configuration is that from router 2, you can enter the command ping 200.2.2.1 and successfully ping the Ethernet port of router 3 across the X.25 network. Note that IGRP updates the routing tables of all IP enabled routers in this network.
Show commands for router 1
router1#sho x25 route
NumberX.121CUDForward To
121234554321Serial0, 1 uses
2 21234567894Serial1, 0 uses
router1#sho x25 vc
SVC 1024, State: D1, Interface: Serial1
Started 1:13:09, last input 0:00:25, output 0:00:07
Connects 21234567894  21234554321 to Serial0 VC 1
Window size input: 2, output: 2
Packet size input: 128, output: 128
PS: 5 PR: 5 ACK: 5 Remote PR: 4 RCNT: 0 RNR: FALSE
Retransmits: 0 Timer (secs): 0 Reassembly (bytes): 0
Held Fragments/Packets: 0/0
Bytes 3076/3076 Packets 61/61 Resets 0/0 RNRs 0/0 REJs 0/0 INTs 0/0
SVC 1, State: D1, Interface: Serial0
Started 1:13:22, last input 0:00:20, output 0:00:38
Connects 21234567894  21234554321 from Serial1 VC 1024
Window size input: 2, output: 2
Packet size input: 128, output: 128
PS: 5 PR: 5 ACK: 4 Remote PR: 5 RCNT: 1 RNR: FALSE
Retransmits: 0 Timer (secs): 0 Reassembly (bytes): 0
Held Fragments/Packets: 0/0
Bytes 3076/3076 Packets 61/61 Resets 0/0 RNRs 0/0 REJs 0/0 INTs 0/0
Show commands for router 2
router2>show x25 vc
SVC 1, State: D1, Interface: Serial0
Started 1:17:03, last input 0:00:04, output 0:00:05
Connects 21234567894
ip 193.1.1.2
cisco cud pid, no Tx data PID
Window size input: 2, output: 2
Packet size input: 128, output: 128
PS: 0 PR: 0 ACK: 7 Remote PR: 0 RCNT: 1 RNR: FALSE
Retransmits: 0 Timer (secs): 0 Reassembly (bytes): 0
Held Fragments/Packets: 0/0
Bytes 3214/3214 Packets 64/64 Resets 0/0 RNRs 0/0 REJs 0/0 INTs 0/0
router2>sho x25 map
Serial0: X.121 21234567894  ip 193.1.1.2
PERMANENT, BROADCAST, 1 VC: 1*
Show command for router 3
router3#show x25 vc
SVC 1024, State: D1, Interface: Serial0
Started 1:19:38, last input 0:00:08, output 0:01:16
Connects 21234554321
ip 193.1.1.1
cisco cud pid, no Tx data PID
Window size input: 2, output: 2
Packet size input: 128, output: 128
PS: 1 PR: 2 ACK: 1 Remote PR: 1 RCNT: 1 RNR: FALSE
Retransmits: 0 Timer (secs): 0 Reassembly (bytes): 0
Held Fragments/Packets: 0/0
Bytes 3260/3306 Packets 65/66 Resets 0/0 RNRs 0/0 REJs 0/0 INTs 0/0
router3#show x25 map
Serial0: X.121 21234554321  ip 193.1.1.1
PERMANENT, BROADCAST, 1 VC: 1024*
router3#sho int s0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 193.1.1.2 255.255.255.0
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation X25, loopback not set
LAPB DTE, modulo 8, k 7, N1 12056, N2 20
T1 3000, interface outage (partial T3) 0, T4 0
State CONNECT, VS 3, VR 3, Remote VR 3, Retransmissions 0
Queues: U/S frames 0, I frames 0, unack. 0, retx 0
IFRAMEs 91/91 RNRs 0/0 REJs 0/0 SABM/Es 179/1 FRMRs 0/0 DISCs 0/0
X25 DTE, address 21234567894, state Rl, modulo 8, timer 0
Defaults: cisco encapsulation, idle 0, nvc 1
input/output window sizes 2/2, packet sizes 128/128
Timers: T20 180, T21 200, T22 180, T23 180, TH 0
Channels: Incoming-only none, Two-way 1-1024, Outgoing-only none
RESTARTs 1/1 CALLs 1+0/0+0/0+0 DIAGs 0/0
Last input 0:00:54, output 0:00:54, output hang never
Last clearing of "show interface" counters never
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
2293 packets input, 45539 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants
208 input errors, 1 CRC, 0 frame, 3 overrun, 10 ignored, 1 abort
2254 packets output, 43027 bytes, 0 underruns
0 output errors, 0 collisions, 60 interface resets, 0 restarts
0 output buffer failures, 0 output buffers swapped out
156 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
Figure 6-17: The show commands for the test X.25 network
Cisco routers also can perform protocol translation, and in this case we will look at translating between IP and X.25. This feature is useful if a third party provides an X.25 connection and sends you X.25-encapsulated data, but you want to deliver it to a host that uses only the TCP/IP communications protocol suite. This can be achieved by connecting a cisco router between the TCP/IP and X.25 hosts. We configure one port to establish an X.25 connection with the X.25 network and a separate port to communicate using IP. The router is then enabled to route both IP and X.25 traffic. The key part to the configuration is to tell the router to translate between IP and X.25.
Let's say that an IP host needs to initiate communications with an X.25 host with an NUA of 1234567890. What we do is associate the IP address 195.1.1.1 with the X.25 address 1234567890 within the translation router. Then if the IP host needs to send data to a machine it thinks is at IP address 195.1.1.1, the translation router will establish an IP connection to the IP host and pretend to be 195.1.1.1, then establish an X.25 session to the X.25 host and deliver the message to it in X.25 format. The configuration to do this is given in Fig. 6-18 and the X.25 command is explained fully as follows.
  Command x25 routing enables the router to perform routing based on X.25 address.
  Command translate tcp 195.1.1.1 binary stream x25 1234567890 takes packets destined for IP address 195.1.1.1, takes the data out of them, repackages this data in X.25, and then sends the translated packets to host 1234567890.
  Command x25 route 1234567890 serial0 tells the router which interface to use to get to the X.25 address 1234567890.
It is necessary to give the serial port of router 1 in Fig. 6-18 an IP address in the same network as the IP address that is being translated so that the router accepts the packet prior to it being translated.
Figure 6-18: Network configuration for X.25–IP translation
Viewing X.25 Connection Status
We will now examine the show commands illustrated in Fig. 6-17. The first command, show x25 route shows the X.25 routing table for router 1. This display numbers each entry starting at 1 in the first column, then associates each X.121 address (otherwise referred to as the NUA) with the appropriate serial interface. This display states, for example, that the X.121 address 21234554321 can be reached via port Serial 0.
The show x25 vc command shows information about the active virtual circuits on this router. In this case, two SVCs have been established, one with ID 1024 and one with ID 1. The normal state for this type of connection is as shown, D1. This command is useful for seeing statistics on the general status of the virtual circuit, such as the number of Receiver Not Ready and Frame Reject (REJ) packets counted.
The show x25 map command shows any X.25 mappings defined for the router. In this case, router 2 has the Serial 0 port mapped for the X.121 address 212234567894, for IP address 193.1.1.2. This map is identified as a permanent mapping, meaning that it was configured with the X.25 map interface command and will forward broadcast datagrams destined for the IP host.
The show interface serial 0 command shows useful summary information on the link. Primarily this command shows whether the port is up (physical connection is okay) and if the protocol is up (the line is synchronized). Beyond that, the key elements of the display are as follows:
  The LAPB DTE identifies this serial port as a DTE configuration, which will work only if the serial port of the corresponding device to which it is connected has a LAPB DCE configuration.
  The modulo 8 indicates that this interface is not using extended addressing. If it were using extended addressing, this entry would show modulo 128. If needed, this parameter will be defined by the X.25 network provider.
  The N1 12056 indicates the maximum layer 2 frame size. Under the X.25 DTE section, the packet size (at the X.25 layer three level) is given as 128.
  The N2 20 indicates that the interface will allow 20 retries before timing out.
  The T1 3000 indicates the T1 timer has a value of 3 seconds. When a command frame is sent, the sender will start this T1 timer. The transmitter will wait for the T1 timer to expire before it receives an acknowledgment of the command frame. If this timer expires without acknowledgment, the sender polls its destination to demand an immediate response. If a response is received, the unacknowledged packet is resent; if there is no response, the link is reset.
  The X25 DTE entry shows the X.121 address and normal operational state of the interface, which is R1.
  The Input/Output window size defines the number of packets that may be transmitted before an acknowledgment is received. This value can vary between 1 and 7, with a default of 2.
It is important that all these values match between the X.25 DTE and DCE devices. The following discusses how these values can be modified, if necessary.
Customizing X.25 Parameters
The first customization we will look at is assigning a range of numbers to be used by each type of virtual circuit. To recap, there are PVCs and SVCs, and communication between a DTE and DCE needs a unique virtual circuit number for each direction of communication. Between any DTE/DCE pair, the assignable values are from 1 to 4095. In the show x25 vc command output of Fig. 6-17, you can see that on router 1, two SVCs are active, one with LCN 1024 and one with LCN 1. SVC 1024 is associated with getting to router 3 and SVC 1 is associated with getting to router 2. These are two-way SVCs, taking the default values for the high and low LCN values. If two more SVCs were defined on this link, they would take the values 1023 and 2.
An X.25 network vendor may decide to allocate specific LCN ranges for different types of PVCs, and if this deviates from the default, you will have to alter your ranges. SVCs can be incoming, two-way, or outgoing, and a value can be assigned for the low and high value in each type's range by using the following commands in interface configuration mode:
  x25 lic valueDefines the low incoming circuit number.
  x25 hic valueDefines the high incoming circuit number.
  x25 ltc valueDefines the low two-way circuit number.
  x25 htc valueDefines the high two-way circuit number.
  x25 loc valueDefines the low outgoing circuit number.
  x25 hoc valueDefines the high outgoing circuit number.
  x25 pvc valueDefines the PVC circuit number.
Note in the preceding commands that the word value is substituted with the desired circuit number for that command. If you have to specify circuit number ranges explicitly, you must adhere to the following numbering scheme:
  PVCs must have the lowest range.
  The next highest range is assigned to the incoming calls.
  The next highest range is assigned to the two-way calls.
  The highest range is assigned to the outgoing calls.
X.25 packet sizes also may be customized for both incoming and outgoing packets on an interface. The packet sizes may be changed with the following commands in interface configuration mode:
  x25 ips bytesTo specify the input packet size in bytes.
  x25 ops bytesTo specify the output packet size in bytes.
X.25 uses a windowing mechanism with a default window size of 2. With reliable links, this default value can be increased throughout the network to improve performance. This is achieved with the following commands:
  x25 win valueThe value defines the number of packets that can be received without an acknowledgment.
  X25 wout valueThe value defines the number of packets that can be sent without an acknowledgment.
Finally, as previously mentioned, the modulo can be regular (modulo 8), which allows virtual circuit window sizes up to 7, or enhanced (modulo 128), which allows window sizes up to 127 packets. This can be changed with the following command in interface configuration mode.
  X25 modulo valueThe value is either 8 or 128.
X.25 is rarely implemented in a private network these days; straight TCP/IP is far more popular. LAPB, however, does retain some popularity even when a TCP/IP network is implemented. Serial links typically use Cisco's default encapsulation of the Cisco proprietary HDLC. This is an efficient protocol but lacks error recovery. If a network link is experiencing noise interference and is carrying large amounts of UDP data, changing the encapsulation in the link from the default HDLC to LAPB will provide error recovery at the link layer, where before there was none.

 


 
Books24x7.com, Inc © 2000 –  Feedback